package cn.joybreeze.model;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @ClassName BaseModel
 * @Description
 * @Author Kjwaa
 * @Email 1135274290@qq.com
 * @Date 2021/5/23 15:31
 */
@Data
public class BaseModel {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @JsonIgnore
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @JsonIgnore
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @JsonIgnore
    @Version
    @TableField(value = "version")
    private Integer version;

    @JsonIgnore
    @TableLogic
    @TableField(value = "deleted")
    private Integer deleted;


}
